#include<stdio.h>
#include<string.h>
char str[10000];
char done[10000];
char temp[10000]; 
int book[10000];
void mark(char a[],int l,int r,int in_str)
{
	if(l!=0&&in_str==0)
		if((a[l-1]>='a'&&a[l-1]<='z')||(a[l-1]>='A'&&a[l-1]<='Z')||(a[l-1]>='0'&&a[l-1]<='9'))
			if((a[r+1]>='a'&&a[r+1]<='z')||(a[r+1]>='A'&&a[r+1]<='Z')||(a[r+1]>='0'&&a[r+1]<='9'))
				if(l==r)
					return;
				else
				{
					for(;l<r;l++)
						book[l]=1;
					return;
				}
	for(;l<=r;l++)
		book[l]=1;
	return;
}
int main()
{
	int i,j,k=0,m,ip,jp;
	while( (scanf("%[^\n]",str))!=EOF)
	{
		getchar();
		memset(book,0,sizeof(book));
		ip=m=0;jp=-100;
		for(i=0;str[i]!='\0';i++)
		{
			if(str[i]==' ')
			{
				for(j=i;str[j]==' ';j++);
				mark(str,i,j-1,0);
				i=j-1;
			}
			if(str[i]=='/'&&str[i+1]=='/')
			{
				str[i]='\0';
				break;
			}
		}
		for(i=0;str[i]!='\0';i++)
			if(book[i]!=1)
				done[m++]=str[i];
		done[m]='\0';
		if(done[0]!='\0')
			printf("%s\n",done);
		memset(done,'\0',sizeof(done)); 
		memset(str,'\0',sizeof(str));
	}
	return 0; 
}
